package com.hxy.apartment.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Util {

    public static String getDate() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        return df.format(new Date());
    }

    public static String getTime() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return df.format(new Date());
    }

    public static void main(String[] args) {
        System.out.println(Util.getDate());
        System.out.println(Util.getTime());
    }
}
